﻿namespace QueryBuilder.Core.Visualization.Tests.Mocks
{
    public class DelegateHandlerMock
    {
        /// <summary>
        /// </summary>
        private object argument;

        /// <summary>
        /// </summary>
        private object canExecuteArgument;

        /// <summary>
        /// </summary>
        public object Argument
        {
            get { return this.argument; }
        }

        /// <summary>
        /// </summary>
        public object CanExecuteArgument
        {
            get { return this.canExecuteArgument; }
        }

        /// <summary>
        /// </summary>
        /// <param name="arg">
        /// </param>
        public void Execute(object arg)
        {
            this.argument = arg;
        }

        /// <summary>
        /// </summary>
        /// <param name="arg">
        /// </param>
        /// <returns>
        /// </returns>
        public bool CanTrueExecute(object arg)
        {
            this.canExecuteArgument = arg;
            return true;
        }

        /// <summary>
        /// </summary>
        /// <param name="arg">
        /// </param>
        /// <returns>
        /// </returns>
        public bool CanFalseExecute(object arg)
        {
            this.canExecuteArgument = arg;
            return false;
        }
    }
}